<?php
	@$newtxt = $_REQUEST["write"];
	$filename = "media_list.txt";
	
	if ($newtxt) {
		$myfile = fopen($filename, "w");
		fwrite($myfile, $newtxt);
		fclose($myfile);
	}
	
	if (file_exists($filename)) {
		echo file_get_contents($filename);
	} else {
		$myfile = fopen($filename, "w");
		fwrite($myfile, "");
		fclose($myfile);
	}
?>